package main

import (
	"gitee.com/jack_zang/public-scripts/go/elastic-ops/core"
	"gitee.com/jack_zang/public-scripts/go/elastic-ops/global"
	"gitee.com/jack_zang/public-scripts/go/elastic-ops/utils"
	"go.uber.org/zap"
)

func main() {
	global.AswVp = core.Viper() // 初始化 Viper 配置文件
	global.AswLog = core.Zap()  // 初始化 zap 日志库
	zap.ReplaceGlobals(global.AswLog)

	resp, err := utils.EsDelIndex("dd")
	if err != nil {
		global.AswLog.Error("删除索引失败", zap.Error(err))
	} else {
		global.AswLog.Info("删除索引成功" + resp)
	}
}
